<?php

namespace app\index\controller;

use think\Controller;
use think\Db;

class Project extends Controller
{
    public function index(){
        $proList=Db::name('project')->select();
        foreach ($proList as $k=>$v){
            $videos=Db::name('video')->where('video_pro_id',$v['pro_id'])->count();
            $proList[$k]['videos']=$videos;
        }
        $this->assign('proList',$proList);
        return $this->fetch();
    }
}
